<template>
  <div class="container">
    <Capetory :lists="foods" title="美食">
      <img
        slot="center"
        src="https://s3.ax1x.com/2021/01/16/srJlq0.jpg"
        alt=""
      />
      <a href="http://www.baidu.com" slot="footer" class="footer">123 </a>
    </Capetory>
    <Capetory :lists="games" title="游戏">
      <ul slot="center">
        <li v-for="(item, index) in games" :key="index">{{ item }}</li>
      </ul>
      <div slot="footer" class="footer">
        <a href="#">单机游戏</a>
        <a href="#">网络游戏</a>
      </div>
    </Capetory>
    <Capetory :lists="films" title="电影">
      <video
        slot="center"
        src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"
        controls
      ></video>
      <!-- <div slot="footer" class="footer">
        <a href="#">经典</a>
        <a href="#">热门</a>
        <a href="#">推荐</a>
      </div>
      <h4 slot="footer"  class="footer">欢迎来到影院</h4> -->
      <!-- 只有template才能v-show -->
      <template v-show：footer>
        <div slot="footer" class="footer">
          <a href="#">经典</a>
          <a href="#">热门</a>
          <a href="#">推荐</a>
        </div>
        <h4 slot="footer" class="footer">欢迎来到影院</h4>
      </template>
    </Capetory>
  </div>
</template>

<script>
import axios from "axios";
import Capetory from "./components/Category.vue";
export default {
  name: "App",
  data() {
    return {
      foods: ["火锅", "烧烤", "小龙虾", "牛排"],
      games: ["红色警戒", "穿越火线", "劲舞团", "超级玛丽"],
      films: ["《教父》", "《拆弹专家》", "《你好，李焕英》", "《尚硅谷》"],
    };
  },
  methods: {},
  components: {
    Capetory,
  },
};
</script>

<style lang='css'>
.container,
.footer {
  display: flex;
  justify-content: space-around;
}
</style>